using System;
using System.Windows.Forms;

using FreeFlow.Administration;

namespace FreeFlowAdministrator
{
	/// <summary>
	/// Summary description for SessionsAdaptor.
	/// </summary>
	public class SessionsAdaptor : Adaptor, IRefreshable
	{
    private SessionCollection sessions;
		public SessionsAdaptor(SessionCollection sessions)
		{
      this.sessions = sessions;
		}

    public override string Text
    {
      get
      {
        return "Sessions";
      }
    }

    public override Control GetRenderer()
    {
      SessionsControl control = new SessionsControl();
      control.LoadSessions(sessions);
      return control; 
    }

    public override object Object
    {
      get
      {
        return sessions;
      }
    }

    #region IRefreshable Members

    public void Refresh()
    {
      sessions.Refresh();
    }

    #endregion
  }
}
